﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Vit.Web;

namespace Vit.Site
{
    public class MvcApplication : UnityMvcApplication
    {
        public override string GetVaryByCustomString(HttpContext context, string custom)
        {
            if (custom == "session")
            {
                return context.Request["ASP.NET_SessionId"];
            }

            return base.GetVaryByCustomString(context, custom);
        }

        protected override void Application_Start(object sender, EventArgs e)
        {
            base.Application_Start(sender, e);
            Vit.Web.Helpers.PortalHelper.RegisterWidgets(typeof(Vit.Site.Controllers.InstallController).Assembly);
        }
    }
}